calling one (Method) class from another class 


First Class

public class MyClass {
         int a = 10;
         
	public void printValues() {
	
		
		
	   System.out.println(a);
	    

	}

}



Second Class 




public class CallingClass {

	
	public static void main(String[] args) {
		
		
		MyClass mc = new MyClass();
		 
		mc.a = mc.a*2;
		mc.printValues();
	

	}

}